#include<stdio.h>
int narcissus(int n)
{
    int a = n / 100;
    int b = (n - a * 100) / 10;
    int c = n % 10;
    if(a * a * a + b * b * b + c * c * c == n) return 1;
    else return 0;
}
int main()
{
    int m, n, x;
    while(scanf("%d %d", &m, &n) != EOF)
    {
        x = 0;
        for(int i = m; i <= n; i ++)
        {
            if(narcissus(i) == 1)
            {
                x ++;
                if(x == 1) printf("%d", i);
                else printf(" %d", i);
            }
        }
        if(x == 0) printf("no");
        
        printf("\n");
    }
    return 0;
}